package com.vancouver.knows.ui.activity.my;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.widget.LinearLayout;
import android.widget.TextView;
import butterknife.Bind;
import butterknife.OnClick;

import com.pangu.ui.refresh.ARefreshViewController;
import com.vancouver.knows.R;
import com.vancouver.knows.ui.base.BaseActivity;

public class MyCommentActivity extends BaseActivity {

	private Context mContext;
	@Bind(R.id.text_tips)
	TextView mTextTips;
	@Bind(R.id.my_comment_layout)
	LinearLayout myCommentLayout;
	@SuppressWarnings("rawtypes")
	private ARefreshViewController mController;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.my_comment_activity);
		mContext = MyCommentActivity.this;
		setViews();
	}

	private void setViews() {
		Intent intent = getIntent();
		mTextTips.setText(intent.getStringExtra("MY_TITLE"));
		loadView();
	}

	private void loadView() {
		mController = new MyCommentPullRefreshView(mContext);
		((MyCommentPullRefreshView) mController).loadData();
		myCommentLayout.addView(mController);
	}

	@OnClick(R.id.cancel)
	public void onCancelClick() {
		finish();
	}

	public void sendEmptyMessage(int what, long delay) {
		super.sendEmptyMessage(what, delay);
	}

}
